import request from '@/utils/request'

// 查询会员卡列表
export function listMemberCard(query) {
  return request({
    url: '/member/memberCard/list',
    method: 'get',
    params: query
  })
}

// 查询会员卡详细
export function getMemberCard(id) {
  return request({
    url: '/member/memberCard/' + id,
    method: 'get'
  })
}

// 新增会员卡
export function addMemberCard(data) {
  return request({
    url: '/member/memberCard',
    method: 'post',
    data: data
  })
}

// 修改会员卡
export function updateMemberCard(data) {
  return request({
    url: '/member/memberCard',
    method: 'put',
    data: data
  })
}

// 批量生成会员卡
export function addMemberCardBatch(data) {
  return request({
    url: '/member/memberCard/batch',
    method: 'post',
    data: data
  })
}

// 删除会员卡
export function delMemberCard(id) {
  return request({
    url: '/member/memberCard/' + id,
    method: 'delete'
  })
}

// 导出会员卡
export function exportMemberCard(query) {
  return request({
    url: '/member/memberCard/export',
    method: 'get',
    params: query
  })
}
